package com.timeDeal.servlet;









import com.alibaba.druid.util.StringUtils;
import com.timeDeal.bean.*;
import com.timeDeal.service.JInduServicce;
import com.timeDeal.service.JiaoyiQingqiuServicce;
import com.timeDeal.service.UserService;
import com.timeDeal.service.XuqiuService;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


/**
 * Created by Administrator on 2016/7/24.
 */

public class ChakanJinduServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doGet(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String  currentpage =request.getParameter("currentpage")  ;
        String  id =request.getParameter("id")  ;
        currentpage = StringUtils.equals(currentpage,null)?"1":currentpage ;
        PageList pageList =  new PageList() ;
        int cu = Integer.valueOf(currentpage) ;
        JInduServicce jInduServicce = new JInduServicce() ;
        pageList = jInduServicce.getJInduByid(Integer.valueOf(id) ,cu) ;
        request.setAttribute("pageList", pageList);
        request.setAttribute("currentpage", currentpage);
        request.setAttribute("id", id);
        request.getRequestDispatcher("/user/chakanjindu.jsp").forward(request,response);






    }
}
